package com.project.system.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.project.common.annotation.Excel;
import com.project.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.util.Date;

/**
 * 考勤记录信息对象 sys_attendance
 *
 * @author kang
 * @date 2021-03-17
 */
public class SysAttendance extends BaseEntity {

    private static final long serialVersionUID = 5753294697471039195L;

    /**
     * 考勤记录ID
     */
    private Long attendanceId;

    private Long userId;

    /**
     * 运营商名称
     */
    private Long deptId;

    @Excel(name = "运营商名称")
    private String deptName;

    /**
     * 姓名
     */
    @Excel(name = "姓名")
    private String userName;

    /**
     * 手机号
     */
    @Excel(name = "手机号")
    private String phoneNumber;

    /**
     * 打卡类型（0上班打卡1下班打卡）
     */
    @Excel(name = "打卡类型", readConverterExp = "0=上班打卡,1=下班打卡")
    private String clockType;

    /**
     * 打卡路段
     */
    @Excel(name = "打卡路段")
    private String clockRoad;

    /**
     * 打卡时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "打卡时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date clockTime;

    /**
     * 打卡备注
     */
    @Excel(name = "打卡备注")
    private String clockRemark;

    public void setAttendanceId(Long attendanceId) {
        this.attendanceId = attendanceId;
    }

    public Long getAttendanceId() {
        return attendanceId;
    }

    public Long getDeptId() {
        return deptId;
    }

    public void setDeptId(Long deptId) {
        this.deptId = deptId;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    public String getDeptName() {
        return deptName;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserName() {
        return userName;
    }

    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }

    public String getPhoneNumber() {
        return phoneNumber;
    }

    public void setClockType(String clockType) {
        this.clockType = clockType;
    }

    public String getClockType() {
        return clockType;
    }

    public void setClockRoad(String clockRoad) {
        this.clockRoad = clockRoad;
    }

    public String getClockRoad() {
        return clockRoad;
    }

    public void setClockTime(Date clockTime) {
        this.clockTime = clockTime;
    }

    public Date getClockTime() {
        return clockTime;
    }

    public void setClockRemark(String clockRemark) {
        this.clockRemark = clockRemark;
    }

    public String getClockRemark() {
        return clockRemark;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("attendanceId", getAttendanceId())
                .append("deptId", getDeptId())
                .append("deptName", getDeptName())
                .append("userId", getUserId())
                .append("userName", getUserName())
                .append("phoneNumber", getPhoneNumber())
                .append("clockType", getClockType())
                .append("clockRoad", getClockRoad())
                .append("clockTime", getClockTime())
                .append("clockRemark", getClockRemark())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .toString();
    }
}
